const e=document.createElement("iframe");e.style.display="none";const t=document.body.appendChild(e),s=t.contentWindow.Array;document.body.removeChild(t),Array.from=s.from;function i(e){return`https://widgets.thereviewsplace.com/2.0/${e}`}function o(e){return"https://repuso.com/?utm_source=widget&utm_medium="+e+"&utm_campaign=powered"}async function a(e,t="Default",s,i){if("Default"===t)return"";if("Inherit"===t)return"inherit";try{const o=t.split(" ").join("+"),a="Roboto"===o?s.replace(/400/g,"300"):s,r=i?`&text=${i}`:"";return await n(e,{id:o,rel:"stylesheet",href:`https://fonts.googleapis.com/css2?family=${o}:ital,wght@${a}&display=swap${r}`}),"fonts"in document&&await Promise.all([...document.fonts.values()].filter((e=>e.family===t)).map((e=>e.load()))),t}catch(e){return console.warn("Unable to load font. Fallback to default"),""}}function n(e,t){var{id:s}=t,i=function(e,t){var s={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{if(null===e.querySelector(`#${s}`)){const a=Object.assign(document.createElement("link"),Object.assign({id:s},i));a.onload=t,a.onerror=()=>o(a.remove()),e.appendChild(a)}else t(null)}))}function r(e){e.target.onerror=null,e.target.src=i("images/no-img.png")}function l(e){const t={y:31536e3,m:2592e3,d:86400,h:3600,min:60,sec:1},s=Date.now()/1e3-e;for(let e in t){const i=Math.floor(s/t[e]);if(i>=1)return i+e}}function c(e){const t=e.reduce(((e,t)=>e+t.official_score*t.official_num_reviews),0),s=e.reduce(((e,t)=>e+t.official_num_reviews),0);return{reviewsNum:s,ratingAvg:s>0?t/s:0}}const d="hydrated",h=!1,f=!0,p=!0;var m=Object.defineProperty,u=new WeakMap,g=e=>u.get(e),b=(e,t)=>t in e,v=(e,t)=>(0,console.error)(e,t),y=new Map,$="undefined"!=typeof window?window:{},w=$.document||{head:{}},x=$.HTMLElement||class{},k={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,s,i)=>e.addEventListener(t,s,i),rel:(e,t,s,i)=>e.removeEventListener(t,s,i),ce:(e,t)=>new CustomEvent(e,t)},_=(()=>{let e=!1;try{w.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch(e){}return e})(),z=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),C=!1,S=[],N=[],R=(e,t)=>t=>{e.push(t),C||(C=!0,4&k.$flags$?E(L):k.raf(L))},M=e=>{for(let t=0;t{M(S),M(N),(C=S.length>0)&&k.raf(L)},E=e=>{return Promise.resolve(t).then(e);var t},j=R(N),O=e=>{const t=new URL(e,k.$resourcesUrl$);return t.origin!==$.location.origin?t.href:t.pathname},P=e=>k.$resourcesUrl$=e,A=e=>"object"===(e=typeof e)||"function"===e;((e,t)=>{for(var s in t)m(e,s,{get:t[s],enumerable:!0})})({},{err:()=>D,map:()=>H,ok:()=>T,unwrap:()=>I,unwrapErr:()=>q});var T=e=>({isOk:!0,isErr:!1,value:e}),D=e=>({isOk:!1,isErr:!0,value:e});function H(e,t){if(e.isOk){const s=t(e.value);return s instanceof Promise?s.then((e=>T(e))):T(s)}if(e.isErr){const t=e.value;return D(t)}throw"should never get here"}var I=e=>{if(e.isOk)return e.value;throw e.value},q=e=>{if(e.isErr)return e.value;throw e.value},W=e=>{const t=e.__childNodes||e.childNodes;e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&"SLOT-FB"!==e.tagName&&F(t,e.tagName).forEach((e=>{var t;1===e.nodeType&&"SLOT-FB"===e.tagName&&((null==(t=G(e,e["s-sn"],!1))?void 0:t.length)?e.hidden=!0:e.hidden=!1)}));for(const e of t)1===e.nodeType&&(e.__childNodes||e.childNodes).length&&W(e)};function F(e,t,s){let i,o=0,a=[];for(;o{const i=[];for((s&&e["s-sr"]||!e["s-sr"])&&i.push(e);(e=e.nextSibling)&&e["s-sn"]===t;)i.push(e);return i},X=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,K=(e,t,...s)=>{let i=null,o=null,a=null,n=!1,r=!1;const l=[],c=t=>{for(let s=0;se[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,l,J);const d=Y(e,null);return d.$attrs$=t,l.length>0&&(d.$children$=l),d.$key$=o,d.$name$=a,d},Y=(e,t)=>{const s={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null,$attrs$:null,$key$:null,$name$:null};return s},Z={},J={forEach:(e,t)=>e.map(Q).forEach(t),map:(e,t)=>e.map(Q).map(t).map(ee)},Q=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),ee=e=>{if("function"==typeof e.vtag){const t={...e.vattrs};return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),K(e.vtag,t,...e.vchildren||[])}const t=Y(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},te=(e,t)=>null==e||A(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?String(e):e,se=(e,t,s)=>{const i=e;return{emit:e=>ie(i,t,{bubbles:!0,composed:!0,cancelable:!0,detail:e})}},ie=(e,t,s)=>{const i=k.ce(t,s);return e.dispatchEvent(i),i},oe=new WeakMap,ae=e=>{const t=e.$cmpMeta$,s=e.$hostElement$,i=t.$flags$,o=(t.$tagName$,()=>{}),a=((e,t)=>{var s;const i=ne(t),o=y.get(i);if(e=11===e.nodeType?e:w,o)if("string"==typeof o){e=e.head||e;let a,n=oe.get(e);if(n||oe.set(e,n=new Set),!n.has(i)){{a=document.querySelector(`[sty-id="${i}"]`)||w.createElement("style"),a.innerHTML=o;const n=null!=(s=k.$nonce$)?s:function(){var e,t,s;return null!=(s=null==(t=null==(e=w.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:t.getAttribute("content"))?s:void 0}();if(null!=n&&a.setAttribute("nonce",n),!(1&t.$flags$))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),s=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(a,(null==s?void 0:s.parentNode)===e?s:null)}else if("host"in e)if(z){const t=new CSSStyleSheet;t.replaceSync(o),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=o+t.innerHTML:e.prepend(a)}else e.append(a);1&t.$flags$&&"HEAD"!==e.nodeName&&e.insertBefore(a,null)}4&t.$flags$&&(a.innerHTML+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),n&&n.add(i)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return i})(s.shadowRoot?s.shadowRoot:s.getRootNode(),t);10&i&&2&i&&(s["s-sc"]=a,s.classList.add(a+"-h")),o()},ne=(e,t)=>"sc-"+e.$tagName$,re=(e,t,s,i,o,a,n)=>{if(s!==i){let n=b(e,t),r=t.toLowerCase();if("class"===t){const t=e.classList,o=ce(s);let a=ce(i);t.remove(...o.filter((e=>e&&!a.includes(e)))),t.add(...a.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in s)i&&null!=i[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in i)s&&i[t]===s[t]||(t.includes("-")?e.style.setProperty(t,i[t]):e.style[t]=i[t])}else if("key"===t);else if("ref"===t)i&&i(e);else if(e.__lookupSetter__(t)||"o"!==t[0]||"n"!==t[1]){const r=A(i);if((n||r&&null!==i)&&!o)try{if(e.tagName.includes("-"))e[t]!==i&&(e[t]=i);else{const o=null==i?"":i;"list"===t?n=!1:null!=s&&e[t]==o||("function"==typeof e.__lookupSetter__(t)?e[t]=o:e.setAttribute(t,o))}}catch(e){}null==i||!1===i?!1===i&&""!==e.getAttribute(t)||e.removeAttribute(t):(!n||4&a||o)&&!r&&(i=!0===i?"":i,e.setAttribute(t,i))}else if(t="-"===t[2]?t.slice(3):b($,r)?r.slice(2):r[2]+t.slice(3),s||i){const o=t.endsWith(de);t=t.replace(he,""),s&&k.rel(e,t,s,o),i&&k.ael(e,t,i,o)}}},le=/\s/,ce=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(le):[]),de="Capture",he=new RegExp(de+"$"),fe=(e,t,s,i)=>{const o=11===t.$elm$.nodeType&&t.$elm$.host?t.$elm$.host:t.$elm$,a=e&&e.$attrs$||{},n=t.$attrs$||{};for(const e of pe(Object.keys(a)))e in n||re(o,e,a[e],void 0,s,t.$flags$);for(const e of pe(Object.keys(n)))re(o,e,a[e],n[e],s,t.$flags$)};function pe(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var me=!1,ue=!1,ge=!1,be=!1,ve=(e,t,s)=>{var i;const o=t.$children$[s];let a,n,r,l=0;if(me||(ge=!0,"slot"===o.$tag$&&(o.$flags$|=o.$children$?2:1)),null!==o.$text$)a=o.$elm$=w.createTextNode(o.$text$);else if(1&o.$flags$)a=o.$elm$=w.createTextNode("");else{if(be||(be="svg"===o.$tag$),a=o.$elm$=w.createElementNS(be?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!me&&f&&2&o.$flags$?"slot-fb":o.$tag$),be&&"foreignObject"===o.$tag$&&(be=!1),fe(null,o,be),null!=(c=B)&&void 0!==c&&a["s-si"]!==B&&a.classList.add(a["s-si"]=B),o.$children$)for(l=0;l{k.$flags$|=1;const s=Array.from(e.__childNodes||e.childNodes);e["s-sr"];for(let e=s.length-1;e>=0;e--){const i=s[e];i["s-hn"]!==U&&i["s-ol"]&&(Ne(ke(i).parentNode,i,ke(i)),i["s-ol"].remove(),i["s-ol"]=void 0,i["s-sh"]=void 0,ge=!0),t&&ye(i,t)}k.$flags$&=-2},$e=(e,t,s,i,o,a)=>{let n,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(r.shadowRoot&&r.tagName===U&&(r=r.shadowRoot);o<=a;++o)i[o]&&(n=ve(null,s,o),n&&(i[o].$elm$=n,Ne(r,n,ke(t))))},we=(e,t,s)=>{for(let i=t;i<=s;++i){const t=e[i];if(t){const e=t.$elm$;Se(t),e&&(ue=!0,e["s-ol"]?e["s-ol"].remove():ye(e,!0),e.remove())}}},xe=(e,t,s=!1)=>e.$tag$===t.$tag$&&("slot"===e.$tag$?e.$name$===t.$name$:s?(s&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$),ke=e=>e&&e["s-ol"]||e,_e=(e,t,s=!1)=>{const i=t.$elm$=e.$elm$,o=e.$children$,a=t.$children$,n=t.$tag$,r=t.$text$;let l;null===r?(be="svg"===n||"foreignObject"!==n&&be,("slot"!==n||me)&&fe(e,t,be),null!==o&&null!==a?((e,t,s,i,o=!1)=>{let a,n,r=0,l=0,c=0,d=0,h=t.length-1,f=t[0],p=t[h],m=i.length-1,u=i[0],g=i[m];for(;r<=h&&l<=m;)if(null==f)f=t[++r];else if(null==p)p=t[--h];else if(null==u)u=i[++l];else if(null==g)g=i[--m];else if(xe(f,u,o))_e(f,u,o),f=t[++r],u=i[++l];else if(xe(p,g,o))_e(p,g,o),p=t[--h],g=i[--m];else if(xe(f,g,o))"slot"!==f.$tag$&&"slot"!==g.$tag$||ye(f.$elm$.parentNode,!1),_e(f,g,o),Ne(e,f.$elm$,p.$elm$.nextSibling),f=t[++r],g=i[--m];else if(xe(p,u,o))"slot"!==f.$tag$&&"slot"!==g.$tag$||ye(p.$elm$.parentNode,!1),_e(p,u,o),Ne(e,p.$elm$,f.$elm$),p=t[--h],u=i[++l];else{for(c=-1,d=r;d<=h;++d)if(t[d]&&null!==t[d].$key$&&t[d].$key$===u.$key$){c=d;break}c>=0?(n=t[c],n.$tag$!==u.$tag$?a=ve(t&&t[l],s,c):(_e(n,u,o),t[c]=void 0,a=n.$elm$),u=i[++l]):(a=ve(t&&t[l],s,l),u=i[++l]),a&&Ne(ke(f.$elm$).parentNode,a,ke(f.$elm$))}r>h?$e(e,null==i[m+1]?null:i[m+1].$elm$,s,i,l,m):l>m&&we(t,r,h)})(i,o,t,a,s):null!==a?(null!==e.$text$&&(i.textContent=""),$e(i,null,t,a,0,a.length-1)):!s&&p&&null!==o&&we(o,0,o.length-1),be&&"svg"===n&&(be=!1)):(l=i["s-cr"])?l.parentNode.textContent=r:e.$text$!==r&&(i.data=r)},ze=[],Ce=e=>{let t,s,i;const o=e.__childNodes||e.childNodes;for(const e of o){if(e["s-sr"]&&(t=e["s-cr"])&&t.parentNode){s=t.parentNode.__childNodes||t.parentNode.childNodes;const o=e["s-sn"];for(i=s.length-1;i>=0;i--)if(t=s[i],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==e["s-hn"])if(X(t,o)){let s=ze.find((e=>e.$nodeToRelocate$===t));ue=!0,t["s-sn"]=t["s-sn"]||o,s?(s.$nodeToRelocate$["s-sh"]=e["s-hn"],s.$slotRefNode$=e):(t["s-sh"]=e["s-hn"],ze.push({$slotRefNode$:e,$nodeToRelocate$:t})),t["s-sr"]&&ze.map((e=>{X(e.$nodeToRelocate$,t["s-sn"])&&(s=ze.find((e=>e.$nodeToRelocate$===t)),s&&!e.$slotRefNode$&&(e.$slotRefNode$=s.$slotRefNode$))}))}else ze.some((e=>e.$nodeToRelocate$===t))||ze.push({$nodeToRelocate$:t})}1===e.nodeType&&Ce(e)}},Se=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(Se)},Ne=(e,t,s)=>("string"==typeof t["s-sn"]&&t["s-sr"]&&t["s-cr"]&&Re(t["s-cr"],t,e,t.parentElement),null==e?void 0:e.insertBefore(t,s));function Re(e,t,s,i){var o,a;let n;if(e&&"string"==typeof t["s-sn"]&&t["s-sr"]&&e.parentNode&&e.parentNode["s-sc"]&&(n=t["s-si"]||e.parentNode["s-sc"])){const e=t["s-sn"],r=t["s-hn"];if(null==(o=s.classList)||o.add(n+"-s"),i&&(null==(a=i.classList)?void 0:a.contains(n+"-s"))){let t=(i.__childNodes||i.childNodes)[0],s=!1;for(;t;){if(t["s-sn"]!==e&&t["s-hn"]===r&&t["s-sr"]){s=!0;break}t=t.nextSibling}s||i.classList.remove(n+"-s")}}}var Me=(e,t,s=!1)=>{var i,o,a,n;const r=e.$hostElement$,l=e.$cmpMeta$,c=e.$vnode$||Y(null,null),d=(h=t)&&h.$tag$===Z?t:K(null,null,t);var h;if(U=r.tagName,s&&d.$attrs$)for(const e of Object.keys(d.$attrs$))r.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(d.$attrs$[e]=r[e]);if(d.$tag$=null,d.$flags$|=4,e.$vnode$=d,d.$elm$=c.$elm$=r.shadowRoot||r,B=r["s-sc"],me=!!(1&l.$flags$),V=r["s-cr"],ue=!1,_e(c,d,s),k.$flags$|=1,ge){Ce(d.$elm$);for(const e of ze){const t=e.$nodeToRelocate$;if(!t["s-ol"]){const e=w.createTextNode("");e["s-nr"]=t,Ne(t.parentNode,t["s-ol"]=e,t)}}for(const e of ze){const t=e.$nodeToRelocate$,r=e.$slotRefNode$;if(r){const e=r.parentNode;let s=r.nextSibling;{let a=null==(i=t["s-ol"])?void 0:i.previousSibling;for(;a;){let i=null!=(o=a["s-nr"])?o:null;if(i&&i["s-sn"]===t["s-sn"]&&e===(i.__parentNode||i.parentNode)){for(i=i.nextSibling;i===t||(null==i?void 0:i["s-sr"]);)i=null==i?void 0:i.nextSibling;if(!i||!i["s-nr"]){s=i;break}}a=a.previousSibling}}const n=t.__parentNode||t.parentNode,l=t.__nextSibling||t.nextSibling;(!s&&e!==n||l!==s)&&t!==s&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),Ne(e,t,s),1===t.nodeType&&"SLOT-FB"!==t.tagName&&(t.hidden=null!=(a=t["s-ih"])&&a)),t&&"function"==typeof r["s-rf"]&&r["s-rf"](t)}else 1===t.nodeType&&(s&&(t["s-ih"]=null!=(n=t.hidden)&&n),t.hidden=!0)}}ue&&W(d.$elm$),k.$flags$&=-2,ze.length=0,V=void 0},Le=(e,t)=>{if(t&&!e.$onRenderResolve$&&t["s-p"]){const s=t["s-p"].push(new Promise((i=>e.$onRenderResolve$=()=>{t["s-p"].splice(s-1,1),i()})))}},Ee=(e,t)=>{if(e.$flags$|=16,4&e.$flags$)return void(e.$flags$|=512);Le(e,e.$ancestorComponent$);return j((()=>je(e,t)))},je=(e,t)=>{const s=e.$hostElement$,i=(e.$cmpMeta$.$tagName$,()=>{}),o=s;if(!o)throw new Error(`Can't render component <${s.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let a;return t&&(a=Ie(o,"componentWillLoad",void 0,s)),i(),Oe(a,(()=>Ae(e,o,t)))},Oe=(e,t)=>Pe(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),Pe=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,Ae=async(e,t,s)=>{var i;const o=e.$hostElement$,a=(e.$cmpMeta$.$tagName$,()=>{}),n=o["s-rc"];s&&ae(e);const r=(e.$cmpMeta$.$tagName$,()=>{});Te(e,t,o,s),n&&(n.map((e=>e())),o["s-rc"]=void 0),r(),a();{const t=null!=(i=o["s-p"])?i:[],s=()=>De(e);0===t.length?s():(Promise.all(t).then(s),e.$flags$|=4,t.length=0)}},Te=(e,t,s,i)=>{try{t=t.render(),e.$flags$&=-17,e.$flags$|=2,Me(e,t,i)}catch(t){v(t,e.$hostElement$)}return null},De=e=>{e.$cmpMeta$.$tagName$;const t=e.$hostElement$,s=()=>{},i=t,o=e.$ancestorComponent$;64&e.$flags$?s():(e.$flags$|=64,qe(t),Ie(i,"componentDidLoad",void 0,t),s(),e.$onReadyResolve$(t),o||He()),e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),512&e.$flags$&&E((()=>Ee(e,!1))),e.$flags$&=-517},He=e=>{E((()=>ie($,"appload",{detail:{namespace:"rw-widgets"}})))},Ie=(e,t,s,i)=>{if(e&&e[t])try{return e[t](s)}catch(e){v(e,i)}},qe=e=>{var t;return e.classList.add(null!=(t=d)?t:"hydrated")},We=(e,t,s,i)=>{const o=g(e),a=e,n=o.$instanceValues$.get(t),r=o.$flags$,l=a;s=te(s,i.$members$[t][0]);const c=Number.isNaN(n)&&Number.isNaN(s);if(s!==n&&!c){if(o.$instanceValues$.set(t,s),i.$watchers$&&128&r){const e=i.$watchers$[t];e&&e.map((e=>{try{l[e](s,n,t)}catch(e){v(e,a)}}))}2==(18&r)&&Ee(o,!1)}},Fe=(e,t,s)=>{var i,o;const a=e.prototype;if(t.$members$||t.$watchers$||e.watchers){e.watchers&&!t.$watchers$&&(t.$watchers$=e.watchers);const s=Object.entries(null!=(i=t.$members$)?i:{});s.map((([e,[s]])=>{if(31&s||32&s){const{get:i,set:o}=Object.getOwnPropertyDescriptor(a,e)||{};i&&(t.$members$[e][0]|=2048),o&&(t.$members$[e][0]|=4096),Object.defineProperty(a,e,{get(){return i?i.apply(this):(t=e,g(this).$instanceValues$.get(t));var t},configurable:!0,enumerable:!0}),Object.defineProperty(a,e,{set(i){const a=g(this);if(o){const n=32&s?this[e]:a.$hostElement$[e];return void 0===n&&a.$instanceValues$.get(e)?i=a.$instanceValues$.get(e):!a.$instanceValues$.get(e)&&n&&a.$instanceValues$.set(e,n),o.apply(this,[te(i,s)]),i=32&s?this[e]:a.$hostElement$[e],void We(this,e,i,t)}We(this,e,i,t)}})}}));{const i=new Map;a.attributeChangedCallback=function(e,s,o){k.jmp((()=>{var n;const r=i.get(e);if(this.hasOwnProperty(r)&&h);else{if(a.hasOwnProperty(r)&&"number"==typeof this[r]&&this[r]==o)return;if(null==r){const i=g(this),a=null==i?void 0:i.$flags$;if(a&&!(8&a)&&128&a&&o!==s){const i=this,a=null==(n=t.$watchers$)?void 0:n[e];null==a||a.forEach((t=>{null!=i[t]&&i[t].call(i,o,s,e)}))}return}}const l=Object.getOwnPropertyDescriptor(a,r);(o=(null!==o||"boolean"!=typeof this[r])&&o)===this[r]||l.get&&!l.set||(this[r]=o)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(o=t.$watchers$)?o:{}),...s.filter((([e,t])=>15&t[0])).map((([e,t])=>{const s=t[1]||e;return i.set(s,e),s}))]))}}return e},Be=async(e,t,s,i)=>{let o;if(!(32&t.$flags$)){t.$flags$|=32;{o=e.constructor;const s=e.localName;customElements.whenDefined(s).then((()=>t.$flags$|=128))}if(o&&o.style){let e;"string"==typeof o.style&&(e=o.style);const t=ne(s);if(!y.has(t)){const i=(s.$tagName$,()=>{});((e,t,s)=>{let i=y.get(e);z&&s?(i=i||new CSSStyleSheet,"string"==typeof i?i=t:i.replaceSync(t)):i=t,y.set(e,i)})(t,e,!!(1&s.$flags$)),i()}}}const a=t.$ancestorComponent$,n=()=>Ee(t,!0);a&&a["s-rc"]?a["s-rc"].push(n):n()},Ve=e=>{const t=e["s-cr"]=w.createComment("");t["s-cn"]=!0,Ne(e,t,e.firstChild)},Ue=(e,t)=>{const s={$flags$:t[0],$tagName$:t[1]};s.$members$=t[2],s.$listeners$=t[3],s.$watchers$=e.$watchers$;const i=e.prototype.connectedCallback,o=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){((e,t)=>{const s={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};s.$onReadyPromise$=new Promise((e=>s.$onReadyResolve$=e)),e["s-p"]=[],e["s-rc"]=[],u.set(e,s)})(this,s)},connectedCallback(){if(!this.__hasHostListenerAttached){const e=g(this);Xe(this,e,s.$listeners$),this.__hasHostListenerAttached=!0}(e=>{if(!(1&k.$flags$)){const t=g(e),s=t.$cmpMeta$,i=(s.$tagName$,()=>{});if(1&t.$flags$)Xe(e,t,s.$listeners$),(null==t?void 0:t.$lazyInstance$)||(null==t?void 0:t.$onReadyPromise$)&&t.$onReadyPromise$.then((()=>{}));else{t.$flags$|=1,12&s.$flags$&&Ve(e);{let s=e;for(;s=s.parentNode||s.host;)if(s["s-p"]){Le(t,t.$ancestorComponent$=s);break}}s.$members$&&Object.entries(s.$members$).map((([t,[s]])=>{if(31&s&&e.hasOwnProperty(t)){const s=e[t];delete e[t],e[t]=s}})),Be(e,t,s)}i()}})(this),i&&i.call(this)},disconnectedCallback(){(async e=>{if(!(1&k.$flags$)){const t=g(e);t.$rmListeners$&&(t.$rmListeners$.map((e=>e())),t.$rmListeners$=void 0)}oe.has(e)&&oe.delete(e),e.shadowRoot&&oe.has(e.shadowRoot)&&oe.delete(e.shadowRoot)})(this),o&&o.call(this),k.raf((()=>{var e;const t=g(this);var s;(null==(e=null==t?void 0:t.$vnode$)?void 0:e.$elm$)instanceof Node&&!t.$vnode$.$elm$.isConnected&&delete t.$vnode$,this instanceof Node&&!this.isConnected&&(s=this,u.delete(s))}))},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${s.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else this.attachShadow({mode:"open"})}}),e.is=s.$tagName$,Fe(e,s)},Ge=(e,t)=>t,Xe=(e,t,s,i)=>{s&&s.map((([s,i,o])=>{const a=Ye(e,s),n=Ke(t,o),r=Ze(s);k.ael(a,i,n,r),(t.$rmListeners$=t.$rmListeners$||[]).push((()=>k.rel(a,i,n,r)))}))},Ke=(e,t)=>s=>{try{e.$hostElement$[t](s)}catch(t){v(t,e.$hostElement$)}},Ye=(e,t)=>4&t?w:8&t?$:e,Ze=e=>_?{passive:!!(1&e),capture:!!(2&e)}:!!(2&e),Je=e=>k.$nonce$=e,Qe=e=>Object.assign(k,e);const et=Ue(class extends x{constructor(){super(),this.__registerHost(),this.action=()=>{const{url:e,newwindow:t}=this.item.content;e&&(t?window.open(e,"_blank"):top.location.href=e)}}render(){const{media:e,content:{url:t,title:s,banner_text:o,body:a}}=this.item;return K(Z,{key:"378dc54a07c138d77852fd9334684979cdd01031",class:"post",dir:"ltr",onClick:this.action,style:{cursor:t?"pointer":"default"}},K("img",{key:"88e5491f80121c9ba3d8b103ae6cfde9faca8d34",alt:"",class:"post-left",src:i("images/lauwer-left.png")}),K("div",{key:"c237c9fab36e21005e13cc88fc0c74ccb7e7387e",class:"post-middle"},K("div",{key:"8370175e049b69f148635ddc961ee0e45e3fb29a",class:"post-title"},s),o?K("div",{class:"post-banner-text"},o):K("img",{alt:"custom post banner",class:"post-banner",src:e}),K("div",{key:"c4817104cb5996a5f89918f7c8897ec2199bcfbd",class:"post-body"},a)),K("img",{key:"9fbdf85ef004734ae76e9beab684b352ab21da52",alt:"",class:"post-right",src:i("images/lauwer-right.png")}))}static get style(){return".post{display:flex;align-items:center;justify-content:center;height:100%;width:100%;padding:15px;box-sizing:border-box;overflow:hidden;animation:fadein 0.6s}.post-left,.post-right{min-width:43px;height:100px}.post-left{margin-left:10px}.post-right{margin-right:10px}.post-middle{display:flex;flex-direction:column;align-items:center;min-width:140px;text-align:center}.post-title{font-weight:bold;font-size:0.9em}.post-banner-text{font-size:1.5em;font-weight:bold;padding-top:10px;padding-bottom:10px}.post-banner{max-height:65px;margin:5px 0px}.post-body{font-style:italic;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}"}},[0,"rw-custom-post",{item:[8]}]),tt=Ue(class extends x{constructor(){super(),this.__registerHost(),this.imgLoad=se(this,"imgLoad"),this.imgError=se(this,"imgError"),this.index=0,this.preload=!1,this.image="none",this.load=()=>{const e=new Image;e.onload=()=>{this.image="url("+this.src+")",this.imgLoad.emit({w:e.width,h:e.height})},e.onerror=()=>this.imgError.emit(),e.src=this.src},this.onIntersection=e=>{e[0].isIntersecting&&(this.io&&this.io.disconnect(),this.loadImage())}}componentDidLoad(){this.preload&&0===this.index&&"none"===this.image?this.loadImage():"IntersectionObserver"in window?(this.io=new IntersectionObserver(this.onIntersection,{rootMargin:"100px"}),this.io.observe(this.host)):this.loadImage()}loadImage(){if(0===this.index)this.load();else{const e=1400*Math.min(3,this.index);window.setTimeout(this.load,e)}}render(){return K(Z,{key:"e5fc1dd2f74bb3d084902f54c6369b5ed269f681",style:{"background-image":this.image}},"none"===this.image&&"image"===this.type?K("div",{class:"spin"},K("div",{class:"bounce1"}),K("div",{class:"bounce2"}),K("div",null)):null)}get host(){return this}static get style(){return"rw-ll-image{display:flex;align-items:center;justify-content:center}.spin{display:flex;justify-content:space-between;width:45px}.spin>div{background-color:currentColor;width:10px;height:10px;border-radius:100%;display:inline-block;-webkit-animation:bounce 1.4s infinite ease-in-out both;animation:bounce 1.4s infinite ease-in-out both}.spin>.bounce1{-webkit-animation-delay:-0.32s;animation-delay:-0.32s}.spin>.bounce2{-webkit-animation-delay:-0.16s;animation-delay:-0.16s}@-webkit-keyframes bounce{0%,80%,100%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1.0)}}@keyframes bounce{0%,80%,100%{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1.0);transform:scale(1.0)}}"}},[0,"rw-ll-image",{src:[1],type:[1],index:[2],preload:[4],image:[32]}]),st=Ue(class extends x{constructor(){super(),this.__registerHost()}render(){return K(Z,{key:"cb8527962cbf73eef615b7354274cbca9154c12a"})}static get style(){return".sc-rw-loader-h{display:block;width:16px;height:16px;border:2px solid;border-bottom-color:transparent;border-radius:50%;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}"}},[2,"rw-loader"]),it=Ue(class extends x{constructor(){super(),this.__registerHost()}render(){return K(Z,{key:"1be5c12020688d4a333aeac092f6ca2af4099a90"},K("div",{key:"62608c2283d0d93cae532a2c41b5be07bf4bfc10",class:this.loading?"loading":""},K("slot",{key:"76dfce19189a86e61163878603d272f2df1211f3"})),this.loading&&K("div",{key:"51bca44784e4b4b9a969e330be518c57c695206f",class:"overlay"},K("rw-loader",{key:"7d4593e199e31f78468763bdcffc0be9efc034d8"})))}static get style(){return".sc-rw-loading-overlay-h{display:grid;grid-template-columns:minmax(0, 1fr)}.sc-rw-loading-overlay-h>div.sc-rw-loading-overlay{grid-row-start:1;grid-column-start:1}.loading.sc-rw-loading-overlay{visibility:hidden}.overlay.sc-rw-loading-overlay{display:flex;justify-content:center;align-items:center}"}},[6,"rw-loading-overlay",{loading:[4]}]),ot=()=>K("symbol",{id:"icon-chevron-left",viewBox:"0 0 21 28",width:"75%",height:"100%"},K("path",{d:"M18.297 4.703l-8.297 8.297 8.297 8.297c0.391 0.391 0.391 1.016 0 1.406l-2.594 2.594c-0.391 0.391-1.016 0.391-1.406 0l-11.594-11.594c-0.391-0.391-0.391-1.016 0-1.406l11.594-11.594c0.391-0.391 1.016-0.391 1.406 0l2.594 2.594c0.391 0.391 0.391 1.016 0 1.406z"})),at=()=>K("symbol",{id:"icon-cross",viewBox:"0 0 32 32"},K("path",{d:"M22.957 23.758c-0.75 0.75-1.966 0.75-2.715 0l-4.242-4.848-4.242 4.846c-0.75 0.75-1.966 0.75-2.715 0-0.75-0.75-0.75-1.966 0-2.715l4.413-5.040-4.414-5.043c-0.75-0.75-0.75-1.965 0-2.715s1.965-0.75 2.715 0l4.243 4.85 4.242-4.85c0.75-0.75 1.965-0.75 2.715 0s0.75 1.966 0 2.715l-4.413 5.043 4.413 5.040c0.75 0.75 0.75 1.966 0 2.717z"})),nt=()=>K("symbol",{id:"icon-share-square-o",viewBox:"0 0 1792 1792"},K("path",{d:"M1472 989v259q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h255q13 0 22.5 9.5t9.5 22.5q0 27-26 32-77 26-133 60-10 4-16 4h-112q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113v-214q0-19 18-29 28-13 54-37 16-16 35-8 21 9 21 29zm237-496l-384 384q-18 19-45 19-12 0-25-5-39-17-39-59v-192h-160q-323 0-438 131-119 137-74 473 3 23-20 34-8 2-12 2-16 0-26-13-10-14-21-31t-39.5-68.5-49.5-99.5-38.5-114-17.5-122q0-49 3.5-91t14-90 28-88 47-81.5 68.5-74 94.5-61.5 124.5-48.5 159.5-30.5 196.5-11h160v-192q0-42 39-59 13-5 25-5 26 0 45 19l384 384q19 19 19 45t-19 45z"})),rt=()=>K("symbol",{id:"icon-quote",viewBox:"0 0 20 20"},K("path",{d:"M5.315 3.401c-1.61 0-2.916 1.343-2.916 3s1.306 3 2.916 3c2.915 0 0.972 5.799-2.916 5.799v1.4c6.939 0.001 9.658-13.199 2.916-13.199zM13.715 3.401c-1.609 0-2.915 1.343-2.915 3s1.306 3 2.915 3c2.916 0 0.973 5.799-2.915 5.799v1.4c6.938 0.001 9.657-13.199 2.915-13.199z"})),lt=()=>K("symbol",{id:"icon-star-outline",viewBox:"0 0 24 24"},K("path",{d:"M12 15.422l3.75 2.25-0.984-4.266 3.328-2.906-4.406-0.375-1.688-4.031-1.688 4.031-4.406 0.375 3.328 2.906-0.984 4.266zM21.984 9.234l-5.438 4.734 1.641 7.031-6.188-3.75-6.188 3.75 1.641-7.031-5.438-4.734 7.172-0.609 2.813-6.609 2.813 6.609z"})),ct=()=>K("symbol",{id:"icon-star-half",viewBox:"0 0 24 24"},K("path",{d:"M12 15.422l3.75 2.25-0.984-4.266 3.328-2.906-4.406-0.375-1.688-4.031v9.328zM21.984 9.234l-5.438 4.734 1.641 7.031-6.188-3.75-6.188 3.75 1.641-7.031-5.438-4.734 7.172-0.609 2.813-6.609 2.813 6.609z"})),dt=()=>K("symbol",{id:"icon-star",viewBox:"0 0 24 24"},K("path",{d:"M12 17.25l-6.188 3.75 1.641-7.031-5.438-4.734 7.172-0.609 2.813-6.609 2.813 6.609 7.172 0.609-5.438 4.734 1.641 7.031z"})),ht=()=>K("symbol",{id:"icon-resize-plus",viewBox:"0 0 512 512"},K("path",{d:"M304 192v32c0 6.6-5.4 12-12 12h-56v56c0 6.6-5.4 12-12 12h-32c-6.6 0-12-5.4-12-12v-56h-56c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h56v-56c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v56h56c6.6 0 12 5.4 12 12zm201 284.7L476.7 505c-9.4 9.4-24.6 9.4-33.9 0L343 405.3c-4.5-4.5-7-10.6-7-17V372c-35.3 27.6-79.7 44-128 44C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208c0 48.3-16.4 92.7-44 128h16.3c6.4 0 12.5 2.5 17 7l99.7 99.7c9.3 9.4 9.3 24.6 0 34zM344 208c0-75.2-60.8-136-136-136S72 132.8 72 208s60.8 136 136 136 136-60.8 136-136z"})),ft=()=>K("symbol",{id:"icon-resize-minus",viewBox:"0 0 512 512"},K("path",{d:"M304 192v32c0 6.6-5.4 12-12 12H124c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm201 284.7L476.7 505c-9.4 9.4-24.6 9.4-33.9 0L343 405.3c-4.5-4.5-7-10.6-7-17V372c-35.3 27.6-79.7 44-128 44C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208c0 48.3-16.4 92.7-44 128h16.3c6.4 0 12.5 2.5 17 7l99.7 99.7c9.3 9.4 9.3 24.6 0 34zM344 208c0-75.2-60.8-136-136-136S72 132.8 72 208s60.8 136 136 136 136-60.8 136-136z"})),pt=()=>K("symbol",{id:"plyr-play",viewBox:"0 0 18 18"},K("path",{d:"M15.562 8.1L3.87.225c-.818-.562-1.87 0-1.87.9v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"})),mt=()=>K("svg",{viewBox:"0 0 24 24",fill:"currentColor"},K("path",{d:"M9 4.5a.75.75 0 0 1 .721.544l.813 2.846a3.75 3.75 0 0 0 2.576 2.576l2.846.813a.75.75 0 0 1 0 1.442l-2.846.813a3.75 3.75 0 0 0-2.576 2.576l-.813 2.846a.75.75 0 0 1-1.442 0l-.813-2.846a3.75 3.75 0 0 0-2.576-2.576l-2.846-.813a.75.75 0 0 1 0-1.442l2.846-.813A3.75 3.75 0 0 0 7.466 7.89l.813-2.846A.75.75 0 0 1 9 4.5ZM18 1.5a.75.75 0 0 1 .728.568l.258 1.036c.236.94.97 1.674 1.91 1.91l1.036.258a.75.75 0 0 1 0 1.456l-1.036.258c-.94.236-1.674.97-1.91 1.91l-.258 1.036a.75.75 0 0 1-1.456 0l-.258-1.036a2.625 2.625 0 0 0-1.91-1.91l-1.036-.258a.75.75 0 0 1 0-1.456l1.036-.258a2.625 2.625 0 0 0 1.91-1.91l.258-1.036A.75.75 0 0 1 18 1.5ZM16.5 15a.75.75 0 0 1 .712.513l.394 1.183c.15.447.5.799.948.948l1.183.395a.75.75 0 0 1 0 1.422l-1.183.395c-.447.15-.799.5-.948.948l-.395 1.183a.75.75 0 0 1-1.422 0l-.395-1.183a1.5 1.5 0 0 0-.948-.948l-1.183-.395a.75.75 0 0 1 0-1.422l1.183-.395c.447-.15.799-.5.948-.948l.395-1.183A.75.75 0 0 1 16.5 15Z"})),ut=({item:{source_logos:e,type:t},settings:{branded:s},size:o})=>{var a,n;if(e){const t=[null===(a=e[2*o])||void 0===a?void 0:a.concat(" 2x"),null===(n=e[3*o])||void 0===n?void 0:n.concat(" 3x")].filter((e=>e)).join();return K("img",{src:e[o],srcset:t,alt:"review source logo",style:{display:"block"}})}if("repuso"!==t||s){const e=[i(`images/${2*o}x${2*o}/logo-${t}.png 2x`),i(`images/${3*o}x${3*o}/logo-${t}.png 3x`)].join();return K("img",{src:i(`images/${o}x${o}/logo-${t}.png`),srcset:e,alt:`${t} logo`,style:{display:"block"}})}},gt=({class:e,href:t,prefix:s})=>K("div",{class:e},K("a",{onClick:e=>e.stopPropagation(),href:t,target:"_blank",style:{color:"inherit",textDecoration:"none"}},s,K("span",{style:{fontFamily:"Courgette, cursive",fontSize:"1.2em"}},"Repuso"))),bt=({class:e,value:t=0,color:s=""})=>{if(t>0){const i=Math.floor(t),o=Number.isInteger(t)?0:1,a=5-(i+o);return K("div",{class:e,style:{color:s,lineHeight:"0"},role:"img","aria-label":`${t} star rating`},Array.from({length:i},(()=>K(yt,{type:"icon-star"}))),1===o&&K(yt,{type:"icon-star-half"}),Array.from({length:a},(()=>K(yt,{type:"icon-star-outline"}))))}},vt=({className:e,size:t,color:s})=>K("div",{role:"img",class:e,style:{height:t,width:t,fontSize:t,color:s}},K(yt,{type:"icon-quote"})),yt=({type:e})=>K("svg",{class:`icon ${e}`,"aria-label":e},K("use",{href:`#${e}`,"aria-hidden":"true"})),$t=(e,t)=>K("svg",{"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden"}},K("style",null,".icon{display:inline-block;width:1em;height:1em;stroke-width:0;stroke:currentColor;fill:currentColor;}"),K("defs",null,t)),wt=Ue(class e extends x{constructor(){super(),this.__registerHost(),this.itemSizeReceived=se(this,"itemSizeReceived"),this.arrows="hover",this.dots="always",this.zoom="hover",this.autoplay=0,this.loadDelay=!0,this.preload=!1,this.index=0,this.maxed=!1,this.videoControls=!1,this.resumePlayback=0,this.playerReady=!1,this.touchPos=null,this.onChangePlayerSize=e=>{this.itemSizeReceived.emit(e)}}handleKeyDown(e){return"ArrowLeft"===e.key?this.showPrev():"ArrowRight"===e.key?this.showNext():void 0}onSrcChange(){const e="string"==typeof this.src?JSON.parse(this.src):this.src||[];this.source=e.filter((({url:e,src:t})=>e||t))}componentWillLoad(){this.onSrcChange()}componentDidLoad(){this.host.addEventListener("touchstart",(e=>{this.touchPos={x:e.touches[0].clientX,y:e.touches[0].clientY}}),{passive:!0}),this.host.addEventListener("touchmove",(e=>{if(!this.touchPos)return;const t=this.touchPos.x-e.touches[0].clientX,s=this.touchPos.y-e.touches[0].clientY;Math.abs(t)>Math.abs(s)&&(t>0?this.showNext():this.showPrev()),this.touchPos=null}),{passive:!0})}connectedCallback(){this.autoplay>0&&this.source.length>1&&window.setTimeout((()=>{this.timer=window.setInterval((()=>this.showNext()),this.autoplay)}),1e3*Math.random())}disconnectedCallback(){window.clearInterval(this.timer)}showNext(){this.index=this.index===this.source.length-1?0:this.index+1}showPrev(){this.index=0===this.index?this.source.length-1:this.index-1}async playerInit(){try{e.player_init||(e.player_init=await import(i("rw-component-player.js"))),this.playerReady=!0}catch(e){console.warn("Failed to load video player")}}onIndexChange(){this.playerReady=!1,this.itemSizeReceived.emit(this.source[this.index].size)}onMaxedChange(){var e,t;(null===(t=null===(e=this.playerRef)||void 0===e?void 0:e.plyr)||void 0===t?void 0:t.playing)?this.itemSizeReceived.emit(this.playerRef.size):this.itemSizeReceived.emit(this.source[this.index].size)}saveItemSize(e,t){this.source.forEach((s=>{s.id===e&&(s.size=t,this.source[this.index].id===e&&this.itemSizeReceived.emit(t))}))}onAction(e){e.stopImmediatePropagation(),window.clearInterval(this.timer)}removeItem(e){var t;this.source=this.source.filter((t=>t.id!==e)),this.itemSizeReceived.emit((null===(t=this.source[this.index])||void 0===t?void 0:t.size)||{w:0,h:0})}render(){if(0===this.source.length)return K(Z,{style:{display:"none"}});let e=null,t=null,s=null;if(this.source.length>0&&"hover"===this.zoom&&(e=K("span",{role:"button","aria-label":this.maxed?"minimize":"maximize",class:"resize hover"+(this.maxed?" maxed":""),onClick:e=>{var t;this.onAction(e),null===(t=this.zoomAction)||void 0===t||t.call(this)}},K(yt,{type:this.maxed?"icon-resize-minus":"icon-resize-plus"}))),this.source.length>1){const e="video"===this.source[this.index].type?" onvideo":"";"always"!==this.arrows&&"hover"!==this.arrows||(t=[K("div",{role:"button","aria-label":"previous",class:"arrows a-prev "+this.arrows+e,onClick:e=>{this.onAction(e),this.showPrev()}},K(yt,{type:"icon-chevron-left"})),K("div",{role:"button","aria-label":"next",class:"arrows a-next "+this.arrows+e,onClick:e=>{this.onAction(e),this.showNext()}},K(yt,{type:"icon-chevron-left"}))]),"always"!==this.dots&&"hover"!==this.dots||(s=K("div",{class:"dots "+this.dots},this.source.map(((e,t)=>K("span",{role:"button","aria-label":"Photo "+(t+1),class:t===this.index?"dot-selected":"dot",onClick:e=>{this.onAction(e),this.index=t}})))))}return K(Z,{tabindex:"0",dir:"ltr",onClick:e=>this.onAction(e)},this.source.map(((e,t)=>K("rw-ll-image",{key:e.id,class:"media-item",src:e.url,type:e.type,index:this.loadDelay?t:0,style:{opacity:t===this.index?"1":"0"},onImgError:()=>{"image"===e.type&&this.removeItem(e.id),"video"===e.type&&this.saveItemSize(e.id,{w:320,h:200})},onImgLoad:t=>this.saveItemSize(e.id,t.detail),preload:this.preload},"video"===e.type&&t===this.index?this.playerReady||this.resumePlayback?K("rw-player",{onItemSizeReceived:this.onChangePlayerSize,ref:e=>{this.playerRef!==e&&(this.playerRef=e)},source:e.src,poster:e.url,controls:this.videoControls,autoplay:!0,resumePlayback:this.resumePlayback}):K("div",{class:"starter",onClick:e=>{this.onAction(e),this.playerInit()}},K(yt,{type:"plyr-play"})):null))),e,t,s,K($t,null,K(ot,null),K(ht,null),K(ft,null),K(pt,null)))}get host(){return this}static get watchers(){return{src:["onSrcChange"],index:["onIndexChange"],maxed:["onMaxedChange"]}}static get style(){return"rw-media{cursor:default;position:relative;width:100%;height:100%;box-sizing:border-box;border-radius:inherit;overflow:hidden;outline:none}@media (hover: hover){rw-media:hover>.hover{visibility:visible}}rw-media:focus>.hover{visibility:visible}.media-item{border-radius:inherit;position:absolute;top:0px;left:0px;width:100%;height:100%;background-position:center center;background-size:cover;background-clip:content-box;background-repeat:no-repeat;transition:opacity 0.6s ease-in}.resize{z-index:2;position:absolute;padding:4px;top:0px;right:0px;color:whitesmoke;filter:drop-shadow(0px 0px 2px gray);line-height:0;font-size:22px;cursor:pointer;visibility:hidden}.resize:hover{color:white}.arrows{z-index:1;position:absolute;top:0px;bottom:0px;display:flex;align-items:center;font-size:16px;line-height:0;cursor:pointer;color:whitesmoke;filter:drop-shadow(0px 0px 2px gray);visibility:hidden;padding:0px 10px}.arrows.onvideo{top:50px;bottom:50px}.arrows:hover{color:white}.arrows.always{visibility:visible}.a-prev{left:0px}.a-next{right:0px;transform:scaleX(-1)}.dots{display:flex;align-items:center;z-index:1;position:absolute;left:50%;transform:translate(-50%, 0);bottom:8%;visibility:hidden}.dots.always{visibility:visible}.dot{width:6px;height:6px;display:inline-block;border-radius:100%;background:lightgray;opacity:0.8;border:1px solid white;margin:0 4px;cursor:pointer}.dot-selected{width:8px;height:8px;display:inline-block;border-radius:100%;background:white;margin:0 4px;cursor:pointer}.starter{display:flex;justify-content:center;align-items:center;padding:15px;font-size:36px;color:white;filter:drop-shadow(0px 0px 2px gray);cursor:pointer;opacity:0.9;z-index:1}.starter:hover{opacity:1}"}},[0,"rw-media",{arrows:[1],dots:[1],zoom:[1],autoplay:[2],loadDelay:[4,"load-delay"],preload:[4],zoomAction:[16],index:[1026],maxed:[4],videoControls:[4,"video-controls"],resumePlayback:[2,"resume-playback"],src:[1],playerRef:[1032,"player-ref"],source:[32],playerReady:[32]},[[0,"keydown","handleKeyDown"]],{src:["onSrcChange"],index:["onIndexChange"],maxed:["onMaxedChange"]}]),xt=Ue(class extends x{constructor(){super(),this.__registerHost()}render(){const{overall_rating:{title:e,title_size:t,rating_size:s,num_reviews:i,num_reviews_enabled:o,num_reviews_size:a}}=this.settings,{reviewsNum:n,ratingAvg:r}=c(this.badge),l={"--title-size":`${t}px`,"--rating-size":`${s}px`,"--num-reviews-size":`${a}px`,"--num-reviews-shift":a<18?`${Math.round((18-a)/2)}px`:"0px"};return K(Z,{key:"8f82be473b1adde64b9c75933b839f7b79cbebe1",style:l},K("h3",{key:"8644a776595279cc4607f747a7caade444894fa0"},e),K("div",{key:"c7af907cea41cce39fe01fb09249188043af5bca",class:"stat"},K("span",{key:"934642602bc3be704a9f41d0c5e80cee6a625089",class:"overall-rating"},r.toFixed(1)),K(bt,{key:"2852d75537cfbd2401173ae65d57e3835ca2be25",value:Number(r.toFixed(1)),class:"overall-star"}),o&&K("span",{key:"96914eef58bf3a60a959529543332ebfa88f733f",class:"overall-num"},i.replace("{{numOfReviews}}",n.toLocaleString("en-US")))))}static get style(){return"h3.sc-rw-overall-rating{font-size:var(--title-size);margin:0;padding-bottom:4px}.stat.sc-rw-overall-rating{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:var(--rating-size)}.overall-rating.sc-rw-overall-rating{font-weight:bold}.overall-num.sc-rw-overall-rating{font-size:var(--num-reviews-size);margin-top:var(--num-reviews-shift);color:var(--secondary)}.overall-star.sc-rw-overall-rating{color:gold}"}},[2,"rw-overall-rating",{settings:[8],badge:[16]}]),kt=Ue(class extends x{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.popupClosed=se(this,"popupClosed")}handleKeyDown(e){"Escape"===e.key&&this.close()}handleClick(){this.close()}close(){this.popupClosed.emit(),this.host.remove()}render(){return K("div",{key:"16cde60c782db8eea8b8e3ca1940d398ff58e606",class:"container",onClick:e=>e.stopPropagation()},K("iframe",{key:"7eb3035c22ca35e93930def0e3cf641fee7e75f1",src:this.source}),K("div",{key:"d3bb035f7bc98b80eee6fd0fce6cdae11488b1d5",role:"button","aria-label":"close",class:"close",onClick:()=>this.close()},K(yt,{key:"5ca3e0eb9050500d55c9c6fc489dfd3264e91948",type:"icon-cross"})),K($t,{key:"ceeddb6cb41bc8da3314695aedfcbc9607d34968"},K(at,{key:"ead3a102fffeb63f81a67c20d8e08da56a8ca622"})))}get host(){return this}static get style(){return":host{all:initial;display:flex;justify-content:center;align-items:center;z-index:2147483002;position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.8)}.container{position:relative;width:80%;height:80%;max-width:800px;max-height:85vh;border-radius:5px;color:#565656;background-color:#ffffff}.container iframe{border:none;border-radius:5px;width:100%;height:100%}.close{position:absolute;top:16px;right:16px;cursor:pointer;font-size:28px}"}},[1,"rw-popup-collect",{source:[1]},[[4,"keydown","handleKeyDown"],[0,"click","handleClick"]]]),_t=Ue(class extends x{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.popupClosed=se(this,"popupClosed"),this.index=0,this.resumePlayback=0,this.maxed=!1,this.fu=()=>(e=>{{const t=g(e),s=t.$hostElement$.isConnected;return s&&2==(18&t.$flags$)&&Ee(t,!1),s}})(this),this.onItemSizeReceived=e=>{this.maxed?this.size=e.detail:this.size=null}}connectedCallback(){screen.orientation.addEventListener("change",this.fu)}disconnectedCallback(){screen.orientation.removeEventListener("change",this.fu)}getWH(){if(this.size){let e=this.size.w,t=this.size.h;const s=e/t,i=.85*window.innerWidth,o=.85*window.innerHeight;return t>o&&(e=o*s,t=o),e>i&&(e=i,t=i/s),{width:Math.trunc(e)+"px",height:Math.trunc(t)+"px"}}return null}handleKeyDown(e){"Escape"===e.key&&this.close()}handleClick(){this.close()}close(){this.popupClosed.emit(),this.host.remove()}resize(){this.maxed||(this.main.style.setProperty("width",this.main.offsetWidth+"px"),this.main.style.setProperty("height",this.main.offsetHeight+"px")),this.maxed=!this.maxed}render(){const{disable_external_links:e,media_autoplay:t,popup_font:s,branded:i,branding_link_modal:o,custom_css:a,slider_enabled_popup:n}=this.settings,{from_image:c,from_name:d,channel_id:h,source_id:f,post_url:p,from_url:m,label:u,text:g,rating_value:b,ts:v,media_arr:y}=this.item;let $=null;this.maxed||($=[K("div",{key:"a32bb517b4fc23ed395ff29a1c3e584b806bf6f1",class:"header"},c&&K("div",{key:"28cc7dc87f2aea896ceb62c9bc764838e101fd84",class:"avatar"},K("img",{key:"fee475106ee874a602729b1cab342dee59a6386a",alt:"",src:c,onError:r})),K("div",{key:"85259acf37e0ecb149e933544d1fb35e30ded506",class:"info"},K("div",{key:"d25e50e657b604dff3ec8661b3f3e18b90662800",class:"name"},d),h||f?K("div",{class:"link"},!p&&!m||e?u:K("a",{href:p||m,target:"_blank"},u,u&&K("span",null," "),K(yt,{type:"icon-share-square-o"}))):null),K("div",{key:"279777330955a0876e0b5c9f1d31f8b8b873b30d",role:"button","aria-label":"close",class:"close",onClick:()=>this.close()},K(yt,{key:"45698086879564123b6912b2d6012a8a60f643c3",type:"icon-cross"}))),K("div",{key:"e55fc724763526dd30e8f21d86ad7eb879b8e876",class:"text",dir:"auto",innerHTML:g}),K("div",{key:"8f7e3b79da4047a45b34419491120c7f3b450a37",class:"stat"},K(bt,{key:"c64ebfa80df2e97c4f3557cf94d7bdde756c0294",value:b,class:"star"}),K("div",{key:"41fb3cdc6a99f7f2ff851607b51dcd015b913218",class:"spacer"}),K("div",{key:"95f3c5477f978ee7409b99da53283fdb65d112c6",class:"date"},l(v),"  "),K(ut,{key:"05ec99762f7dae4a9c2e77c9aeec340466b35596",item:this.item,settings:this.settings,size:28}))]);let w=null;return(null==y?void 0:y.length)>0&&(w=K("rw-media",{key:"2f539914534278d5fb9d9caf2852d864a73a60c9",onItemSizeReceived:this.onItemSizeReceived,class:this.maxed?"media maxed":"media",maxed:this.maxed,index:this.index,autoplay:t,loadDelay:!1,src:y.slice(0,n?12:1),videoControls:!0,zoomAction:()=>this.resize(),resumePlayback:this.resumePlayback})),K(Z,{key:"8650a3b82900651595aaef1e6bf4884141acb25c"},K("div",{key:"ee32b7b4aaa03112fc929a3c250462f8c395025c",class:"popup container",dir:"ltr",onClick:e=>e.stopPropagation(),style:s?{"font-family":s}:null},K("div",{key:"a132580c75aec4b56ef71e88be2c04c7d7c73360",class:this.maxed?"main maxed":"main",ref:e=>this.main=e,style:this.getWH()},$,w),i&&K(gt,{key:"991558e7a8a49bb1b3d16f3046c8b408c013cac7",class:"branding",prefix:"Powered by ",href:o}),K($t,{key:"cf69c6c7fa5be08f99d40988248bd1147a3a6eb3"},K(dt,{key:"b1df52c9891814812a31573ab963f40673a510ae"}),K(ct,{key:"a17dcb39814f5d44f15d69c812affbb87aadb65b"}),K(lt,{key:"2438f3b9d03d1d61c1057484ec13b1198e20e593"}),K(nt,{key:"f83260fa4f0a868e39c12eb8f43319fb6ec4abf2"}),K(at,{key:"cdca7289859b314a9ea4b45ff882b3a97765d6c1"}))),a&&K("style",{key:"eaaae3237a2fe6e6d7cf511e209d5bb6c2071856","data-name":"custom-css"},a))}get host(){return this}static get style(){return":host{all:initial;display:flex;justify-content:center;align-items:center;z-index:2147483002;position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.8);font-size:14px;font-family:Verdana, Helvetica, Arial, sans-serif}.container{display:flex;flex-direction:column;overflow:hidden}.main{min-width:33vw;max-width:600px;max-height:85vh;padding:30px;display:flex;flex-direction:column;color:#565656;background-color:#ffffff;transition:width 0.5s, height 0.5s;border-radius:5px;box-sizing:border-box}.main.maxed{min-width:auto;max-width:85vw;padding:4px}.branding{align-self:flex-end;margin-top:4px;font-size:12px;color:#ffffff}.header{display:flex;align-items:flex-start;min-height:35px}.avatar{margin-right:10px}.avatar img{object-fit:cover;min-height:35px;min-width:35px;max-width:35px;border-radius:5px}.info{display:flex;flex-direction:column;align-items:flex-start;flex-grow:1;margin-right:10px}.name{font-weight:bold}.link{color:#b8b8b8;font-size:13px}.link a,.link a:hover{display:flex;align-items:center;color:inherit;text-decoration:none}.link svg{font-size:16px}.close{display:flex;cursor:pointer;font-size:28px}.text{overflow-y:auto;word-break:break-word;line-height:24px;min-height:48px;margin-top:10px;margin-bottom:10px}.stat{display:flex;align-items:center;min-height:28px}.spacer{flex-grow:1}.star{font-size:22px;color:gold}.media{min-height:0;height:30vh;margin-top:10px;border:1px solid #f2f2f2;border-radius:5px}.media.maxed{min-height:auto;height:100%;margin:0;border:0px}"}},[1,"rw-popup-review",{item:[8],settings:[8],index:[2],resumePlayback:[2,"resume-playback"],maxed:[1028],size:[1040]},[[4,"keydown","handleKeyDown"],[0,"click","handleClick"]]]),zt=_t,Ct=Ue(class extends x{constructor(){super(),this.__registerHost(),this.onClick=()=>{const{vanity_url:e,review_button:{mode:t,url:s,new_window:i}}=this.settings;if("url"===t)i?window.open(s,"_blank"):top.location.href=s;else if("collect"===t){const t=document.createElement("rw-popup-collect");t.setAttribute("source","https://"+e+".repuso.com/collect"),document.body.appendChild(t)}}}render(){const{review_button:{text:e,background_color:t,text_color:s}}=this.settings;return K(Z,{key:"135d30a6439c5984ee06705e0e9acda4d953a456",style:{"--background-color":t,"--text-color":s}},K("div",{key:"7c1e82eac5fb670f89203d4b660cec7708e870f9",role:"button","aria-label":e,onClick:this.onClick},e))}static get style(){return".sc-rw-review-button-h{display:flex;align-items:center}div.sc-rw-review-button{text-align:center;color:var(--text-color);background-color:var(--background-color);padding:10px 16px;font-weight:bold;cursor:pointer;font-size:16px;border-radius:5px}"}},[2,"rw-review-button",{settings:[8]}]),St=Ue(class extends x{constructor(){super(),this.__registerHost()}render(){const{reviews_summary:{title:e,title_size:t,text:s,text_size:i,text_color:o,show_note:a,show_note_icon:n,note:r,note_icon_color:l,note_text_size:c}}=this.settings;return K(Z,{key:"154f19ed25da659c6fc4a887301a3668b3976e3d",style:{"--title-size":`${t}px`,"--text-size":`${i}px`,"--text-color":o,"--note-icon-color":l,"--note-text-size":`${c}px`},dir:"auto"},K("h3",{key:"2fc08fba4d1843803a302d69a8c0a12d6e51a37e"},e),K("p",{key:"04003f19c75a517a95c00ef7dbc3ca0109cb1e46"},s),a&&K("div",{key:"00f3c04e117e27a02286c2d7ad596ce63a3885cf",class:"note"},n&&K(mt,{key:"e50ed8d8d99cea50e4c1f6b7e392fff2dc2c7d1d"}),r))}static get style(){return"h3.sc-rw-reviews-summary{font-size:var(--title-size);margin:0}p.sc-rw-reviews-summary{color:var(--text-color);font-size:var(--text-size);line-height:26px}.note.sc-rw-reviews-summary{font-size:var(--note-text-size);display:flex;gap:4px;align-items:center}.note.sc-rw-reviews-summary>svg.sc-rw-reviews-summary{color:var(--note-icon-color);height:1.6em;width:1.6em}"}},[2,"rw-reviews-summary",{settings:[8]}]),Nt=Ue(class extends x{constructor(){super(),this.__registerHost(),this.onDown=e=>{e instanceof MouseEvent&&e.preventDefault(),this.x=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,this.left=this.main.scrollLeft,this.isDown=!0},this.onMove=e=>{if(this.isDown){this.isDrag=!0;const t=(e instanceof MouseEvent?e.clientX:e.touches[0].clientX)-this.x;Math.abs(t)>8&&(this.isLocked=!0),this.main.scrollLeft=this.left-t,this.overflow=this.getOverflow()}},this.onUp=()=>{this.isDown=!1,this.isDrag=!1,this.isLocked=!1},this.onWheel=e=>{e.preventDefault(),this.scroll(1.2*e.deltaY)},this.scroll=e=>{const t=this.main.scrollWidth-this.main.offsetWidth-4;this.main.scrollLeft+=Math.min(e,t),setTimeout((()=>this.overflow=this.getOverflow()),200)},this.getOverflow=()=>this.main.scrollWidth<=this.main.offsetWidth?null:0===this.main.scrollLeft?"r":this.main.offsetWidth+this.main.scrollLeft>=this.main.scrollWidth?"l":"lr"}componentDidLoad(){this.overflow=this.getOverflow()}onResize(){this.overflow=this.getOverflow()}render(){return K(Z,{key:"ec99d21728865fa63eb66f54111f10830901b716"},["lr","l"].includes(this.overflow)&&K("span",{key:"2c021b90896dba67320106c89881731cec0a44e6",class:"scroll-button left",onClick:()=>this.scroll(-120)},K(yt,{key:"3911a9409a2a1783f819e9aa5932e4d806642a2c",type:"icon-chevron-left"})),K("div",{key:"8394d0615285101beed0c7579dab002d7caeb0f0",ref:e=>this.main=e,class:`overflow ${this.overflow||""} ${this.isDrag?"":"smooth"}`,onMouseDown:this.onDown,onTouchStart:this.onDown,onMouseMove:this.onMove,onTouchMove:this.onMove,onMouseUp:this.onUp,onMouseLeave:this.onUp,onWheel:this.onWheel},K("div",{key:"95b840512d979c5ee1d6c165fa848bb64e256dd4",class:this.isLocked?"locked":""},K("slot",{key:"8c08e1c37680c0770db62af4bdfdbd96c4ee3414"}))),["lr","r"].includes(this.overflow)&&K("span",{key:"013f02a84b57ec180e2853522cbbbfd4d06087eb",class:"scroll-button right",onClick:()=>this.scroll(120)},K(yt,{key:"d37f71671d1c800aba29f0b388e138a3d64686e3",type:"icon-chevron-left"})),K($t,{key:"1efd14c84341a33af910fba87e10916c36eb1f36"},K(ot,{key:"d0c17de123a491fad5ba0d6612616727c4ad6267"})))}static get style(){return".sc-rw-scrollable-h{display:flex;overflow:hidden;position:relative}.overflow.sc-rw-scrollable{overflow:hidden;overscroll-behavior:contain;--fade-out:transparent 0px, transparent 15px, black 40px;--fade-out-l:to right, var(--fade-out);--fade-out-r:to left, var(--fade-out)}.overflow.smooth.sc-rw-scrollable{scroll-behavior:smooth}.overflow.lr.sc-rw-scrollable{mask-image:linear-gradient(var(--fade-out-l)),\n linear-gradient(var(--fade-out-r));-webkit-mask-image:linear-gradient(var(--fade-out-l)),\n linear-gradient(var(--fade-out-r));mask-size:50%;-webkit-mask-size:50%;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:left, right;-webkit-mask-position:left, right}.overflow.l.sc-rw-scrollable{mask-image:linear-gradient(var(--fade-out-l));-webkit-mask-image:linear-gradient(var(--fade-out-l))}.overflow.r.sc-rw-scrollable{mask-image:linear-gradient(var(--fade-out-r));-webkit-mask-image:linear-gradient(var(--fade-out-r))}.scroll-button.sc-rw-scrollable{width:20px;position:absolute;top:0;bottom:0;display:flex;align-items:center;cursor:pointer;z-index:1}.scroll-button.left.sc-rw-scrollable{left:0}.scroll-button.right.sc-rw-scrollable{transform:rotate(180deg);right:0}.locked.sc-rw-scrollable{pointer-events:none}"}},[6,"rw-scrollable",{isDrag:[32],isLocked:[32],overflow:[32]},[[9,"resize","onResize"]]]),Rt=Ue(class extends x{constructor(){super(),this.__registerHost(),this.reviewsFilterChanged=se(this,"reviewsFilterChanged"),this.selected=-1,this.onClick=e=>{this.selected!==e&&(this.selected=e,this.reviewsFilterChanged.emit(-1===e?{}:this.badge[e]))},this.Logo=({src:e})=>e?K("img",{alt:"channel logo",src:e}):null}componentWillLoad(){const{ratingAvg:e}=c(this.badge);this.ratingAvg=e}render(){const{top_tabs:{text_size:e,alignment:t,all_reviews:s,bottom_border_color:i}}=this.settings;return K(Z,{key:"7d90c8b68079a9e28d4b0fb61b8ce21ea063e0e7",style:{"--text-size":`${e}px`,"--alignment":t,"--bottom-border-color":i}},"left"!==t&&K("span",{key:"fc07f47962dc4ac771905d6624a519b17af3201d",class:"filler"}),K("rw-scrollable",{key:"292e7394e6ee865638777584c8606fbc0a75aab3"},K("div",{key:"b6fdeffadf8298154c2318f85bb0a4e57247f5ef",class:"tabs"},K("div",{key:"72b2ae89fd00514e6db9dc501ce0aa97138ab952",class:-1===this.selected?"tab selected":"tab",onClick:()=>this.onClick(-1)},K("span",{key:"d3180f06f54f87bbd9c4c6892eea45083c65fde0",class:"tab-label"},s),K("span",{key:"32ee38f0f44b8fee1fc54e90383e237b01627d11",class:"tab-rating"},this.ratingAvg.toFixed(1))),this.badge.map(((e,t)=>K(Ge,null,K("span",{class:"filler small"}),K("div",{class:this.selected===t?"tab selected":"tab",onClick:()=>this.onClick(t)},K(this.Logo,{src:e.logo}),K("span",{class:"tab-label"},e.label),e.official_score>0&&K("span",{class:"tab-rating"},e.official_score.toFixed(1)))))))),"right"!==t&&K("span",{key:"f1e0b82dc46bb09306b69a31cbf8f6624a002f9b",class:"filler"}))}static get style(){return".sc-rw-top-tabs-h{overflow:hidden;display:flex;justify-content:var(--alignment);font-size:var(--text-size)}.tabs.sc-rw-top-tabs{display:flex}.tab.sc-rw-top-tabs{display:flex;align-items:center;gap:6px;padding:8px 6px;cursor:pointer;text-wrap:nowrap;border-bottom:2px solid var(--bottom-border-color)}.tab.selected.sc-rw-top-tabs{border-bottom:2px solid var(--primary, black);cursor:default}.filler.sc-rw-top-tabs{flex-grow:1;border-bottom:2px solid var(--bottom-border-color)}.filler.small.sc-rw-top-tabs{flex-grow:0;width:20px;min-width:10px}.tab-label.sc-rw-top-tabs{white-space:nowrap}.tab-rating.sc-rw-top-tabs{font-weight:bold}img.sc-rw-top-tabs{display:block;width:20px;height:20px}"}},[2,"rw-top-tabs",{settings:[8],badge:[8],selected:[32]}]),Mt=Ue(class extends x{constructor(){super(),this.__registerHost(),this.badge=[]}render(){const{reviews_summary:e,top_tabs:t,overall_rating:s,review_button:i}=this.settings;return K(Z,{key:"5e52d9a5a5a09d1ce23ed2db14aaf4e2f7392dc7"},((null==e?void 0:e.enabled)||(null==t?void 0:t.enabled)||(null==s?void 0:s.enabled)||(null==i?void 0:i.enabled))&&K("div",{key:"b7d210e81b0f4471b002fa88a68a4d90b5ebeb56",class:"summary-1"},(null==e?void 0:e.enabled)&&(null==e?void 0:e.text)&&K("rw-reviews-summary",{key:"83cb7b7ba3e92b79cb2015f67a8db3706f2b661a",settings:this.settings}),(null==t?void 0:t.enabled)&&this.badge.length>0&&K("rw-top-tabs",{key:"49c9239f7541da6a38e09d102fb6a280dd99f9ce",settings:this.settings,badge:this.badge}),((null==s?void 0:s.enabled)||(null==i?void 0:i.enabled))&&K("div",{key:"8d8dccf4f30b6f718fdf17e31d8843f4a465a5e5",class:"summary-2"},(null==s?void 0:s.enabled)&&this.badge.length>0&&K("rw-overall-rating",{key:"4fc2aa7161cd9aabc847a9dddc93ee737334f9fc",settings:this.settings,badge:this.badge}),!(null==s?void 0:s.enabled)&&K("span",{key:"46307343ca510639e12a470850e2e3adae3b06a0"}),(null==i?void 0:i.enabled)&&K("rw-review-button",{key:"37fa2b560888b732c6998b3e96d4400e4a06d10b",settings:this.settings}))))}static get style(){return".summary-1{display:flex;flex-direction:column;color:var(--primary);margin:var(--summary-margin);margin-bottom:20px}.summary-2{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px}rw-reviews-summary+rw-top-tabs,rw-reviews-summary+.summary-2,rw-top-tabs+.summary-2{margin-top:40px}"}},[0,"rw-summary",{settings:[8],badge:[16]}]),Lt=Rt,Et=Ue(class extends x{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.media=[],this.reviews=[],this.loading=!0,this.loadingMore=!1,this.filter={}}async apiGetWidgetsPosts(e={}){const t={disable_custom_posts:this.dataDisableCustomPosts,tags:this.dataContentTags,website_id:this.dataWebsiteId};return async function(e,t,s){const i=[...Object.entries(window.rw_schema_params||{}).filter((([e,t])=>t)).map((([e,t])=>[`schema[${e}]`,`${t}`])),...Object.entries(t||{}).filter((([e,t])=>t)).map((([e,t])=>[e,`${t}`]))],o=i.length>0?`?${new URLSearchParams(i).toString()}`:"",a=await fetch("https://api.thereviewsplace.com/v1/widgets/posts/"+e+o),n=await a.json();return s?s(n):n}(this.dataRwGrid,Object.assign(Object.assign(Object.assign({},t),e),this.filter),this.dataAdapter)}dataAdapter(e){const{items:t,settings:s}=e;return Object.assign(Object.assign({},e),{items:s.remove_line_breaks?t.map((e=>{return Object.assign(Object.assign({},e),{text:(t=e.text,null==t?void 0:t.replace(/
/g,"\n").replace(//g,"\n").replace(/
/g,"\n").replace(/\n\n/g,"\n"))});var t})):t,settings:Object.assign(Object.assign({},s),{text_lines:Math.max(1,Math.floor((s.card_height-30-35-18-5-4)/26)),branding_link:o("grid"),branding_link_modal:o("grid-modal")})})}async reviewsFilterChangedHandler(e){this.loading=!0;const{channels:t,sources:s}=e.detail;this.filter={channels:t,sources:s,disable_custom_posts:Boolean(t||s)},this.data=await this.apiGetWidgetsPosts(),await this.fallbackToAllReviews(),this.reviews=[],await this.onClickMore(this.data.settings.rows),this.loading=!1}async fallbackToAllReviews(){const{channels:e,sources:t}=this.filter;Boolean(e||t)&&0===this.data.items.length&&(this.filter={},this.data=await this.apiGetWidgetsPosts())}async componentWillLoad(){this.data=await this.apiGetWidgetsPosts();const{branded:e,font:t,button_color:s,button_text_color:i,card_height:o,font_color:n,no_background_color:r,background_color:l,margin:c,show_border:d,border_color:h,border_radius:f,styles:p}=this.data.settings,{primary:m,secondary:u,padding:g,background:b,no_background_color:v}=p||{};e&&a(this.host,"Courgette","0,400","Repuso");const y=await a(this.host,t,"0,400;0,700;1,400");this.cssVars={"--primary":m,"--secondary":u,"--general-padding":g?`${g}px`:void 0,"--general-background":v?"transparent":b,"--card-height":`${o}px`,"--font-color":n,"--background-color":r?"transparent":l,"--margin":c>0?c/2+"px":"-1px 0px 0px -1px","--summary-margin":`0px ${c/2}px`,"--border":d?`1px solid ${h||"#CCCCCC"}`:"none","--border-radius":`${f||0}px`,"--button-color":s,"--button-text-color":i,"--button-margin-bottom":e?"0px":"20px","--font-family":y,"--display":"inline-block"}}componentDidLoad(){var e;this.loading=!1,this.onClickMore(this.data.settings.rows),this.data.settings.popup_font=window.getComputedStyle(this.host).getPropertyValue("font-family"),(e=this.data.schema)&&null===document.querySelector("#rw-schema")&&document.head.insertAdjacentHTML("beforeend",e)}async onClickMore(e){if(!this.loadingMore)try{this.loadingMore=!0,await this.showMore(e)}finally{this.loadingMore=!1}}async showMore(e){const t=this.calculateColumnCount();let s=e*t;this.reviews.length%t&&(s=Math.floor(this.reviews.length/t)*t-this.reviews.length+s);const i=this.data.items.filter((e=>e.ts_order)).pop(),o=this.data.items.slice(0,s);this.data=Object.assign(Object.assign({},this.data),{items:this.data.items.slice(s)}),this.reviews=[...this.reviews,...o];const a=this.data.items.length,n=3*this.data.settings.more_rows;if(this.data.more&&a-n<0){const{more:e,items:t=[]}=await this.apiGetWidgetsPosts({before_ts:(null==i?void 0:i.ts_order)||0,limit_posts:Math.abs(a-n)});this.data=Object.assign(Object.assign({},this.data),{more:e,items:[...this.data.items,...t]})}}calculateColumnCount(){const e=this.host.offsetWidth/250;return e>=3?3:e>=2?2:1}popupReview(e,t,s=!1){var i,o,a,n,r,l,c;const d=document.createElement("rw-popup-review");d.item=e,d.settings=this.data.settings,d.maxed=s,d.index=null===(i=this.media[t])||void 0===i?void 0:i.index,(null===(n=null===(a=null===(o=this.media[t])||void 0===o?void 0:o.playerRef)||void 0===a?void 0:a.plyr)||void 0===n?void 0:n.playing)&&(d.resumePlayback=null===(c=null===(l=null===(r=this.media[t])||void 0===r?void 0:r.playerRef)||void 0===l?void 0:l.plyr)||void 0===c?void 0:c.currentTime),s&&(d.size={w:this.media[t].offsetWidth,h:this.media[t].offsetHeight}),document.body.appendChild(d)}render(){const{badge:e,items:t,settings:s,settings:{media_autoplay:i,icon_size:o,button_color:a,text_lines:n,view_post_text:l,enable_more_button:c,more_rows:d,branded:h,button_text:f,branding_link:p,custom_css:m,hide_on_mobile:u,slider_enabled_small:g}}=this.data;return u&&window.screen.width<=468?null:K(Z,{style:this.cssVars},K("div",{class:"widget"},K("rw-summary",{settings:s,badge:e}),K("rw-loading-overlay",{loading:this.loading},K("div",{class:"container",dir:"ltr"},K("div",{class:"grid"},this.reviews.map(((e,t)=>{var c;return e.content?K("div",{class:"column",key:e.id},K("div",{class:"item"},K("rw-custom-post",{item:e}))):K("div",{class:"column",key:e.id},K("div",{class:"item"},(null===(c=e.media_arr)||void 0===c?void 0:c.length)>0?K("rw-media",{class:"media",ref:e=>this.media[t]=e,zoomAction:()=>this.popupReview(e,t,!0),autoplay:i,src:e.media_arr.slice(0,g?3:1)}):K(vt,{className:"quote-left",size:(o||34)+"px",color:a||"#E67E21"}),K("div",{class:"data"},K("div",{dir:"auto"},K("div",{class:"text",style:{"-webkit-line-clamp":n},innerHTML:e.text}),K("div",{class:"rating"},K(bt,{value:e.rating_value,class:"star"}))),K("div",{class:"footer",onClick:()=>this.popupReview(e,t)},K("div",{class:"info"},K("div",{class:"name"},e.from_name),K("div",{class:"link"},K("div",{class:"view-post"}," ",l," "),K(ut,{item:e,settings:s,size:15}))),e.from_image&&K("div",{class:"avatar"},K("img",{alt:"",src:e.from_image,onError:r}))))))})),K("div",{class:"column-ghost"}),K("div",{class:"column-ghost"})),c&&t.length>0&&K("a",{role:"button",href:"javascript:void(0)",class:this.loadingMore?"more loading":"more",onClick:()=>this.onClickMore(d)},f,this.loadingMore&&K("rw-loader",null)))),h&&K(gt,{class:"branding",prefix:"Powered by ",href:p})),K($t,null,K(dt,null),K(ct,null),K(lt,null),K(rt,null)),m&&K("style",{"data-name":"custom-css"},m))}get host(){return this}static get style(){return":host{all:initial;display:var(--display, none);font-family:var(--font-family, Verdana, Helvetica, Arial, sans-serif);background-color:var(--general-background);padding:var(--general-padding);box-sizing:border-box;width:100%}.container{display:flex;flex-direction:column;overflow-anchor:none}.grid{display:flex;flex-wrap:wrap}.column{flex:1 1 33.3%;min-width:250px;animation:fadein 0.6s}.column-ghost{flex:1 1 33.3%;min-width:250px;height:0px}@keyframes fadein{0%{opacity:0}100%{opacity:1}}.item{display:flex;overflow:hidden;padding:15px;box-sizing:border-box;height:var(--card-height, 170px);color:var(--font-color, black);background-color:var(--background-color);margin:var(--margin);border:var(--border);border-radius:var(--border-radius)}.quote-left{transform:rotate(180deg);margin-right:5px}.media{margin-right:8px;min-width:120px;max-width:120px;border:1px solid #f2f2f2;border-radius:8px}.data{flex-grow:1;position:relative;overflow:hidden}.text{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;font-size:14px;line-height:26px;padding-left:3px}.footer{position:absolute;right:0px;bottom:0px;display:flex;justify-content:flex-end;cursor:pointer;max-width:100%;overflow:hidden}.rating{margin-top:5px}.star{font-size:18px;margin:0px -2px 0px 1px;color:gold}.info{display:flex;flex-direction:column;justify-content:space-around;align-items:flex-end;overflow:hidden}.name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;font-weight:bold;max-width:100%}.link{display:flex;align-items:center}.view-post{opacity:0.6;font-size:12px;white-space:nowrap}.avatar{display:flex;align-items:flex-end}.avatar img{object-fit:cover;width:35px;height:35px;margin-left:10px;border-radius:5px}.more{display:flex;gap:8px;align-self:center;margin:20px;padding:12px 30px;border-radius:5px;text-align:center;font-weight:bold;cursor:pointer;font-size:14px;user-select:none;-moz-user-select:none;-webkit-user-select:none;text-decoration:none;-webkit-touch-callout:none;background-color:var(--button-color, #E67E21);color:var(--button-text-color, #FFFFFF);margin-bottom:var(--button-margin-bottom)}.more:hover{opacity:.9}.more.loading{opacity:.8;cursor:default}.branding{margin:2px 0px;font-size:12px;color:#b2b2b2;text-align:center}"}},[1,"rw-widget-grid",{dataRwGrid:[1,"data-rw-grid"],dataDisableCustomPosts:[1,"data-disable-custom-posts"],dataContentTags:[1,"data-content-tags"],dataWebsiteId:[1,"data-website-id"],data:[32],reviews:[32],loading:[32],loadingMore:[32],cssVars:[32]},[[0,"reviewsFilterChanged","reviewsFilterChangedHandler"]]]),jt=Et;(function(){n(document.head,{id:"connect-googleapis",rel:"preconnect",href:"https://fonts.googleapis.com"}),n(document.head,{id:"connect-gstatic",rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:""});const e=import.meta.url.split("/").pop().split(".").shift(),t="div[data-rw-"+e.split("-").pop()+"]";document.querySelectorAll(t).forEach((t=>{if(!t.querySelector(e)){const s=document.createElement(e);for(let e of t.getAttributeNames())s.setAttribute(e,t.getAttribute(e));s.removeAttribute("id"),s.removeAttribute("style"),t.appendChild(s)}}))})();const Ot=e=>{"undefined"!=typeof customElements&&[et,tt,st,it,wt,xt,kt,zt,Ct,St,Nt,Mt,Lt,jt].forEach((t=>{customElements.get(t.is)||customElements.define(t.is,t,e)}))};export{Ot as defineCustomElements,O as getAssetPath,P as setAssetPath,Je as setNonce,Qe as setPlatformOptions};Ot();